#ifndef SETTINGWIDGET_H
#define SETTINGWIDGET_H

#include <QWidget>
#include <QPaintEvent>
#include <QPainter>
#include <QString>
#include <QSettings>
#include "MapWidget/bspline.h"

namespace Ui {
class SettingWidget;
}

class SettingWidget : public QWidget
{
    Q_OBJECT

public:
    explicit SettingWidget(QWidget *parent = 0);
    ~SettingWidget();

protected:
    void paintEvent(QPaintEvent *event);
private slots:
    void on_getMap_clicked();
    void on_getStation_clicked();
    void on_ok_clicked();

signals:
    void updateMap();
    void updateStation();
    void mapLoad(QString path);

private:
    Ui::SettingWidget *ui;
    QString basePath;

    QString fileTrans(QString fileName);
    void setConfig(QString key, QString val);
    void getConfig();
};

#endif // SETTINGWIDGET_H
